API Documentation
Public Member Functions | List of all members
nkAstraeus::TextureCopyEffect Class Referencefinal

A texture copy effect. More...

Inheritance diagram for nkAstraeus::TextureCopyEffect:
nkAstraeus::Effect

Public Member Functions

 TextureCopyEffect ()
 
 ~TextureCopyEffect ()
 
virtual EFFECT_TYPE getType () const override
 
nkGraphics::TexturegetSourceTexture () const
 
nkGraphics::SamplergetSourceSampler () const
 
void setSourceTexture (nkGraphics::Texture *value)
 
void setSourceSampler (nkGraphics::Sampler *value)
 
virtual bool load () override
 
virtual void unload () override
 
- Public Member Functions inherited from nkAstraeus::Effect
 Effect ()
 
virtual ~Effect ()
 
nkMemory::StringView getName () const
 
nkGraphics::ShadergetShader () const
 
void setName (nkMemory::StringView value)
 

Detailed Description

A texture copy effect.

This effect is plain simple and will just take a texture on input, that it will fit into the rendering target.
Uses for such an effect could be to render a texture into a smaller target, or copy a texture into another one for a later use.
To help, some tweaking can be done about the way the texture will be sampled by providing a custom sampler to the effect.

Constructor & Destructor Documentation

◆ TextureCopyEffect()

nkAstraeus::TextureCopyEffect::TextureCopyEffect ( )

Default constructor. See EffectManager::createOrRetrieve().

◆ ~TextureCopyEffect()

nkAstraeus::TextureCopyEffect::~TextureCopyEffect ( )

Destructor. See EffectManager::erase().

Member Function Documentation

◆ getType()

virtual EFFECT_TYPE nkAstraeus::TextureCopyEffect::getType ( ) const
overridevirtual
Returns
The effect type, TEXTURE_COPY in this case.

Implements nkAstraeus::Effect.

◆ getSourceTexture()

nkGraphics::Texture* nkAstraeus::TextureCopyEffect::getSourceTexture ( ) const
Returns
The texture used as input by the effect.

◆ getSourceSampler()

nkGraphics::Sampler* nkAstraeus::TextureCopyEffect::getSourceSampler ( ) const
Returns
The sampler used by the effec if it has been overloaded, nullptr else.

◆ setSourceTexture()

void nkAstraeus::TextureCopyEffect::setSourceTexture ( nkGraphics::Texture value)

Sets the texture to use as an input to the effect.

Parameters
valueThe texture to use.

◆ setSourceSampler()

void nkAstraeus::TextureCopyEffect::setSourceSampler ( nkGraphics::Sampler value)

Overloads the sampler used to sample and copy the texture into the target. By default, the sampler used clamps the coordinates for sampling and uses point sampling.

Parameters
valueThe sampler to use, nullptr to reset to the default one.
Remarks
This parameter can be updated even after the effect has been loaded, without needing to reload it.

◆ load()

virtual bool nkAstraeus::TextureCopyEffect::load ( )
overridevirtual

◆ unload()

virtual void nkAstraeus::TextureCopyEffect::unload ( )
overridevirtual

The documentation for this class was generated from the following file: